<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
	<div id="i1">
		<a>python</a>
	</div>
	
	<div id="search_conditions">
		<div class="condition">
			<a onclick="AddCondition(this,'#search_conditions')"> + </a>
			<input />
		</div>
	</div>
	
	<script src="js/jquery-1.8.2.js"></script>
	<script>
		function AddCondition(ths,container){
			//copy condition div
			//再把copy的div追加到search_conditions下面
			//parent()找到父标签,clone()克隆
		    var cp = $(ths).parent().clone();
			//$('#search_conditions').append(cp);
			cp.children(':first').text('-').attr('onclick',"Removecondition(this,'#search_conditions')");  //将+号变为-号
			cp.appendTo('#search_conditions') //将cp的数据appendTo到#search_conditions标签里面
		}
	
		function Removecondition(ths,container){
			//$(ths)代表自己
			$(ths).parent().remove();
		}
	</script>
</body>
</html>